#include <gtk/gtk.h>

int main(int argc, char *argv[])
{
	GtkWidget *window = NULL;
	GdkPixbuf *pixbuf = NULL;
	GdkBitmap *bitmap = NULL;
	GdkPixmap *pixmap = NULL;

	gtk_init(&argc, &argv);

	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
	gtk_widget_set_app_paintable(window, TRUE);
	gtk_widget_realize(window);

	pixbuf = gdk_pixbuf_new_from_file("demo1.png", NULL);
	gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &bitmap, 128);
	gtk_widget_shape_combine_mask(window, bitmap, 0, 0);
	gdk_window_set_back_pixmap(window->window, pixmap, FALSE);

	g_object_unref(pixbuf);
	g_object_unref(bitmap);
	g_object_unref(pixmap);

	gtk_widget_show_all(window);
	gtk_main();
	return TRUE;
}

